package com.ruoyi.system.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 采集规则Mapper接口
 *
 * @author chenming
 * @date 2024-10-16
 */
@Component
public interface DynamicMapper
{
    List<Map<String, Object>> selectDynamic(@Param("tableName") String tableName,
                                            @Param("columns") String columns,
                                            @Param("pn") Integer pn,
                                            @Param("ps") Integer ps);

    Long selectCountDynamic(@Param("tableName") String tableName);


    /**
     * 动态创建表
     *
     * @param params params
     * @author nx-xn2002
     */
    void createTable(Map<String, Object> params);

    /**
     * 插入数据
     *
     * @param params params
     * @author nx-xn2002
     */
    void insertData(Map<String, Object> params);

}
